var tm='<div class="aw-bg-fff aw-mt10 aw-assest-time swiper-container">'+
		'<ul class="swiper-wrapper" style="overflow:visible;">'+
			'<li class="aw-time-li swiper-slide" v-for="(list,key) in List_Date" @click="Click_Today(key+1)" :class="Class_Time_Hover(key+1,today)" :data-year="list.year" :data-month="list.month" :data-day="list.day" :data-week="list.week">'+
				'<div class="aw-time-yue">{{list.month}}月</div>'+
				'<div class="aw-time-num">{{list.day}}</div>'+
				'<div class="aw-time-zhou">{{list.week}}</div>'+
			'</li>'+
		'</ul>'+
	'</div>';
var Vue_Date=Vue.extend({
	template:tm,
	props:{
		today:{//当前页
			today:[String,Number],
			required:true
		}
	},computed:{
		List_Date(){
			//当前时间以后的15天
			var StartDate = new Date();
			var EndDate = new Date();
			EndDate.setDate(StartDate.getDate() + 15);
			var DateArry = [];
			var Weeks = ['日','一','二','三','四','五','六'];
			while((EndDate.getTime() - StartDate.getTime()) >= 0) {
				var month = (StartDate.getMonth() + 1).toString().length == 1 ? "0" + (StartDate.getMonth() + 1).toString() : (StartDate.getMonth() + 1);
				var day = StartDate.getDate().toString().length == 1 ? "0" + StartDate.getDate() : StartDate.getDate();
				var week = Weeks[StartDate.getDay()];
				var year = StartDate.getFullYear();
				DateArry.push({year:year,month:month,day:day,week:'周'+week});
				StartDate.setDate(StartDate.getDate() + 1);
			}
			return DateArry;
		}
	},methods:{
		Click_Today(key){
			console.log(key)
			vm.form.today=key;
			vm.form.day=DateToday(key-1);
			//this.Call_back(key);
		},Class_Time_Hover(key,today){
			console.log(key,today)
			//选择日期后
			if(key==today){
				return 'hover';
			}
		}
	}
});
window.V_Assest_date=Vue_Date;
